<?php
	session_start();
	$forwardPage = "index.php";
	
	if(isset($_SESSION['nit'])){
		header("Location: " . $forwardPage);
		exit;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="es">
	<head>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<title>Inicio de Sesi&oacute;n</title>
		<link rel="stylesheet" type="text/css" href="css/login.css" />
		<link rel="shortcut icon" href="css/images/login.png" />
	</head>
	<body>
		<form id="formLogin" method="post" action="validacionLogin.php">
			<div id="loginDIV">
				<div id="titulo">
					<h1>Iniciar Sesi&oacute;n</h1>
				</div>
				<hr />
				<div id="datosSesion">
					<div id="usuarioDIV">
						<label for="nit">NIT Empresa: <span class="obligatorio">(*)</span></label>
						<input id="nit" name="nit" class="requerido" type="text" maxlength="20"/>
					</div>
					<div id="claveDIV">
						<label for="clave">Contrase&ntilde;a: <span class="obligatorio">(*)</span></label>
						<input id="clave" name="clave" class="requerido" type="password" maxlength="40"/>
					</div>
				</div>
				<?php if (!empty($_GET['intento'])) echo "<div id='fallo'>NIT o Contrase&ntilde;a incorrectas. Por favor intente nuevamente.</div>"; ?>
				<div id="obligatorio">
					<span class="obligatorio">(*)</span> Obligatorio
				</div>
				<div id="submitDIV">
					<input id="submitBtn" type="submit" value="Entrar" />
				</div>
			</div>
		</form>
		<script src="js/jquery-1.8.3.js" type="text/javascript" ></script>
		<script src="js/login.js" type="text/javascript"></script>
	</body>
</html>
